/**
 * User: alesj
 * Date: 2005.6.9
 * Time: 11:01:02
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.ecos.page;

import java.io.Serializable;

public class CharsKey implements Comparable, Serializable {

    private char[] chars;

    public CharsKey(char[] chars) {
        this.chars = chars;
    }

    public int compareTo(Object o) {
        CharsKey ck = (CharsKey)o;
        return new String(chars).compareTo(new String(ck.chars));
    }

    public boolean equals(Object obj) {
        return (compareTo(obj) == 0);
    }

    public String toString() {
        return new String(chars);
    }

}
